using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace ConsoleApplication11.Models.Mapping
{
    public class TargetEditMap : EntityTypeConfiguration<TargetEdit>
    {
        public TargetEditMap()
        {
            // Primary Key
            this.HasKey(t => t.TE_ID);

            // Properties
            this.Property(t => t.patient_id)
                .HasMaxLength(20);

            // Table & Column Mappings
            this.ToTable("TargetEdit");
            this.Property(t => t.TE_ID).HasColumnName("TE_ID");
            this.Property(t => t.TE_Content).HasColumnName("TE_Content");
            this.Property(t => t.patient_id).HasColumnName("patient_id");
            this.Property(t => t.follow_up_id).HasColumnName("follow_up_id");
            this.Property(t => t.Target_ID).HasColumnName("Target_ID");
            this.Property(t => t.Create_Time).HasColumnName("Create_Time");
            this.Property(t => t.State).HasColumnName("State");
        }
    }
}
